<script src="../media/system/js/mootools-core.js" type="text/javascript"></script>
<script src="../media/system/js/core.js" type="text/javascript"></script>
<form action="index.php?top=page&option=com_frclub" method="post" name="adminForm" id="adminForm" class="adminform">
<!-- LEFT -->
 <?php echo $this->loadTemplate('search','default') ?>
 <!-- END LEFT -->
 
 <!-- CONTENT -->
 <div id="jm-content">
    <div class="cc title">
        <div class="id"><?php echo $this->info_ocba->OCBA_CODE; ?></div>
        <div class="cc-title">
            <p class="top"><?php echo $this->info_ocba->OCBA_KANA; ?></p>
            <p class="bot"><?php echo $this->info_ocba->OCBA_NAME; ?><span class="float-right">【<?php echo $this->info_ocba->OCBA_SHOR; ?>】</span></p>
        </div>
    </div>
    <div class="clearfix"></div>
    <div class="menu-cc">
        <ul id="nav">
        <?php 
            foreach(bgData::getMenuDetailClub() as $key=>$item){
                $acctive = 'normal';
                if(JRequest::getVar('task') == $key){
                    $acctive = 'current';
                }
         ?>
            <li class="<?php echo $acctive; ?>"><a href="index.php?top=page&option=com_frclub&task=<?php echo $key; ?>&id=<?php echo $this->info_ocba->OCBA_CODE; ?>"><?php echo $item; ?></a></li>
          <?php } ?>
            
        </ul>
    </div>
   <div class="content">
   <h3 class="h_title">指導者一覧</h3>
         <div id="">     
     
        <div class="info-basic">
                                            
            <div>
                   
                    <table width="100%" cellpadding="0" cellspacing="0" id="tb_blue" border=0>
                        <tbody>
                            <th>コード</th>
                            <th>氏名</th>
                            <th>所属</th>
                            <th>常勤</th>
                            <th>指導員資格</th>
                            <th>有効期限</th>
                            <th></th>
                          
                            <?php
                                $rows = $this->row;
                                
                                if($rows != null){
                                foreach ($this->row as $key=>$value)
                                {
                             ?>
                            <tr>
                                <td style="width: 6%;"><?php echo $value->COCH_CODE; ?></td>
                                <td style="width: 10%;"><?php echo $value->COCH_NAME; ?></td>
                                <td style="width: 20%;"><?php echo $value->OCBA_NAME; ?></td>
                                <td style="width: 5%;text-align: center;"><?php if($value->COCH_WOKF ==1) echo "●"; else echo ""; ?></td>
                                <td style="width: 20%;">
                                <?php 
                                        $model=$this->getModel();
                                        $this->colis =$model->loadcoli($value->COCH_CODE);
                                        if($this->colis != null){
                                            $i=0;
                                            foreach($this->colis as $k=>$coli){ 
                                                $i++;
                                                if($i == 1){
                                                   echo $coli->COCM_NAME;
                                                }
                                                else{
                                                    echo "<br />" . $coli->COCM_NAME;
                                                }
                                               echo '(';
                                               echo $coli->COLI_TERM; 
                                               if($coli->COLI_UNIT == 1) echo '回';
                                                       else if  ($coli->COLI_UNIT == 2) echo '期';
                                                       else if  ($coli->COLI_UNIT == 3) echo '年度';
                                               echo ')';
                                            }
                                        }
                                ?> 
                                </td>
                                <td style="width: 13%;"><?php if($value->COCH_LDATE!='0000-00-00 00:00:00') echo HelperBG::F_GetDate_JP($value->COCH_LDATE); ?></td>
                                <td style="width: 6%;"><button href="index.php?top=page&option=com_frleader&task=detail&cid=<?php echo $value->COCH_CODE; ?>">詳細</button></td>
                            </tr>
                          <?php
                                }
                            }else{
                            ?>
                                <tr>
                                    <td class="center" colspan="8">このセンターに所属する指導者は，存在しません。</td>
                                </tr>
                            <?php    
                            }
                             ?>
                            
                        </tbody>
                    </table>  
                    <input type="hidden" name="task" value=""/>
                    <input type="hidden" name="boxchecked" value="0"/>          
         </div>
        </div>                               
        
</div>

  
        </div>                                
    
 </div>
 </form>
 <!-- END CONTENT -->
                           